#include <jni.h>
#include <string>
#include <android/log.h>
#include <malloc.h>

extern "C" {
#include "librtmp/rtmp.h"
}

#include "VideoChannel.h"
#include "maniulog.h"


VideoChannel *videoChannel=0;

extern "C"
JNIEXPORT void JNICALL
Java_com_maniu_bilirtmp_live_LivePusher_native_1init(JNIEnv *env, jobject thiz) {
    videoChannel=new VideoChannel();

}extern "C"
JNIEXPORT void JNICALL
Java_com_maniu_bilirtmp_live_LivePusher_native_1setVideoEncInfo(JNIEnv *env, jobject thiz,
                                                                jint width, jint height, jint fps,
                                                                jint bitrate) {
    if (!videoChannel){
        return;
    }

    videoChannel->setVideoEncInfo(width,height,fps,bitrate);
}